let vm1 = new Vue({
    el: "#articleCollectMain",
    data: {
        pageInfo: {
            pageNum: 1,
            pageSize: 3,
        },
        userLoginInfo: {},
        flag: null,
        inlineFormInput: {
            value: null,
        },
    },
    methods: {
        /**
         * 我的 收藏文章
         * @param pageNum
         * @param pageSize
         */
        titleByNameLimit: function (pageNum,pageSize) {
            axios({
                url: `article/titleByNameLimit/${pageNum}/${pageSize}`,
                method: 'post',
                data: this.inlineFormInput,
            }).then(res => {
                this.pageInfo = res.data.data

            }).catch(error => {
                console.log(error)
            })
        },
        logout: function () {
            axios({
                url: `user/logout`,
            }).then(res => {
                sessionStorage.clear();
                location.href = "logout";
            })
        },
        /**
         * 弹出当前文章详情页
         * @param articleList 当前文章对象集合
         */
        getArticleDetail:function(articleList){
            layer.articleList=articleList;
            let index=layer.open({
                type: 2,
                title:false,
                content: 'articleDetail',
                area: ['70%','85%'],
                // end:()=>{
                //
                // }
            });
        },

    },
    created: function () {
        let userInfo = sessionStorage.getItem("vmUserInfo");
        if (userInfo != null) {
            this.userLoginInfo = JSON.parse(userInfo);
        } else {
            location.href = "";
        }
        this.flag = 4;

        this.titleByNameLimit(this.pageInfo.pageNum, this.pageInfo.pageSize)
    },
    mounted() {

    },
});